package com.bugmonkey.example;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;

import androidx.annotation.Nullable;

import com.bugmonkey.cameraviewx.camera.CameraViewActivity;
import com.bugmonkey.cameraviewx.camera.ImagePreviewActivity;

public class MyCameraViewActivity extends CameraViewActivity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setDisableFinishAfterChoose();
    }



    @Override
    protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
        if(requestCode == CameraViewActivity.REQUEST_CODE_PREVIEW && resultCode == RESULT_OK && data!=null){
            Uri uri = data.getParcelableExtra(ImagePreviewActivity.RESULT_URI);
            MainActivity.start(this,uri);
        }
    }
}
